﻿using UnityEngine;
using System.Collections;

public class AlternativeBossModelMaterial : MonoBehaviour
{
	public SkinnedMeshRenderer skinnedMeshRenderer;
	public Material[] alternativeMaterials;
	public Animation defaultAnimation;

	void Awake()
	{
		if (defaultAnimation == null)
			return;

		if (alternativeMaterials == null)
			return;

		if (alternativeMaterials.Length <= 0)
			return;

		defaultAnimation.wrapMode = WrapMode.Loop;
		defaultAnimation.Play();

		skinnedMeshRenderer.materials = alternativeMaterials;
	}
}